var  data = Mock.mock({
    "list|5":[{
        "name":"@cname",
        "age":"@natural(20,60)",
        "gender|1":["male","female"]
    }]
})


var userData=[];
userData.push({  // 从尾部添加数据
    username:'admin',
    password:'admin'
})

for(var i=0;i<5;i++){

    userData.unshift({
        username:'test'+i,
        password:'test'+i
    })
}


Mock.mock("http://test.org/employee/list","get",data.list);
Mock.mock('http://test.org/add','post',userData)

/*
 *  1. 数据模拟
 *  2. ajax拦截
* */